unit Buttons;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

const
  N = 30;

type
  TForm1 = class(TForm)
    btn1: TButton;
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
   arr : array [0..899] of TButton;
implementation

{$R *.dfm}

procedure TForm1.btn1Click(Sender: TObject);
var i : integer;
begin
  for i := 0 to N*N-1 do
  begin
    arr[i] := TButton.Create(Form1);
    arr[i].Width := 10;
    arr[i].Height := 10;
    arr[i].Parent := Form1;
    arr[i].Top := 100 + 10*(i mod N);
    arr[i].Left := 150 + 10*(i div N);
  end;
end;


end.
